<?php echo $header; ?>
<style>.list tbody td{background:none;}</style>
<div id="content">
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/customer.png" alt="" /> Thống kê nhánh thành viên</h1>
	  <div class="buttons"><a onclick="$('#form').submit();" class="button">Thanh toán</a></div>
    </div>
    <div class="content">
		 <table class="list">
          <thead>
		  <p style="font-weight:bold;font-size: 16px;">Thông tin thành viên</p>
		  <p style="font-weight:bold;font-size: 12px;color:red">Tiền thưởng thành viên: <?php echo $transaction;?></p>
           <tr> 
              <td class="center">Họ tên</td>  
			  <td class="center">Mã thành viên</td>
              <td class="center">Cấp</td>
              <td class="center">Ngày tham gia</td>
          </thead>
         <tbody>
		  <tr style="background:<?php echo $color_level;?>">
			  <td class="center"><?php echo $name; ?></td>
              <td class="center"><?php echo $madn; ?></td>
			  <td class="center"><?php echo $level; ?></td>
			  <td class="center"><?php echo $date_added; ?></td>
			  </tr>
          </tbody>
        </table>
	 <form action="<?php echo $action;?>" method="post" enctype="multipart/form-data" id="form">
		<table class="list">
		 <thead>
            <tr>
              <td width="1" style="text-align: center;"><input type="checkbox" onclick="$('input[name*=\'selected\']').attr('checked', this.checked);" /></td>
              <td class="center">STT</td>  
			  <td class="center">Cấp</td>		
              <td class="center">Mã thành viên</td>  
			  <td class="center">Họ tên</td>
			  <td class="center">Email</td>		
              <td class="center">Ngày Tham gia</td>
				
            </tr>
          </thead>
		 <tbody>
            <?php if ($customers) { ?>
            <?php foreach ($customers as $key => $customer) { ?>
			<?php if($customer['level']){?>
				<tr style="background:<?php echo $customer['color_level'];?>">
			<?php } elseif(!$customer['status_id']) {?>
				<tr style="background:#d3d3d3">
			<?php } else { ?>
				<tr>
			<?php }?>
			 <td style="text-align: center;">
			 <input type="checkbox" name="selected[]" value="<?php echo $customer['customer_id']; ?>" /></td>
              <td class="left"><?php echo $key + 1; ?></td>
              <td class="left"><?php echo $customer['level']; ?></td>
              <td class="left"><?php echo $customer['madn']; ?></td>
              <td class="left"><?php echo $customer['name']; ?></td>
              <td class="left"><?php echo $customer['email']; ?></td>
              <td class="left"><?php echo $customer['date_added']; ?></td>
            </tr>
            <?php } ?>
            <?php } else { ?>
            <tr>
              <td class="center" colspan="7"></td>
            </tr>
            <?php } ?>
          </tbody>
        </table>
		</form>
    </div>
  </div>
</div
<?php echo $footer; ?> 